package com.atme.micromall.member.service;

import com.aliyuncs.exceptions.ClientException;
import com.atme.micromall.member.bean.Members;
import com.atme.micromall.member.dto.MemberParam;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface MemberService {

    /**
     * 登录
     * @param userNameOrPhoneNumber
     * @param password
     * @param phoneNumber
     * @param smsCode
     * @param login
     * @return
     */
    String login(String userNameOrPhoneNumber, String password, String phoneNumber, String smsCode, Integer login);

    int update(Integer id, MemberParam memberParam);

    /**
     * 查询所有会员信息
     * @return
     */
    List<Members> getAllMembers();


    /**
     * 发送短信验证码
     * @param phoneNumber
     */
    void setSms(String phoneNumber) throws ClientException;


    /**
     * 注册
     * @param phoneNumber
     * @param smsCode
     * @return
     */
    int create(String phoneNumber,String smsCode);


    /**
     * 模拟修改积分
     * @param id
     * @param number
     * @return
     */
    int updatePoints(Integer id,Integer number);


    Members getMemberById(Integer id);

}
